{include file=member.header.html}
{include file="title.html"}

<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak={$baidu_ak}"></script>
<div id="allmap" style="margin-top:20px;width:100%; height:200px; "></div>

<form method="post">
    <ul class="form_content">
        <li>
            <h3>{$lang.longitude}:</h3>
            <p><input id="lng" name="lng" type="text" value="{$store_info.lng}"></p>
        </li>
        <li>
            <h3>{$lang.latitude}:</h3>
            <p><input id="lat" name="lat" type="text"  value="{$store_info.lat}"></p>
        </li>
        <li>
            <h3>{$lang.rank}:</h3>
            <p><input id="zoom" name="zoom" type="text"  value="{$store_info.zoom}"></p>
        </li>
        <li>
            <input type="submit" class="red_btn" value="{$lang.save}">
        </li>
    </ul>
    
</form>
<script type="text/javascript">
// 百度地图API功能
    var map = new BMap.Map("allmap");

    var point = new BMap.Point({$store_info.lng}, {$store_info.lat});
            map.centerAndZoom(point, {$store_info.zoom});
            map.addControl(new BMap.NavigationControl());
    map.enableScrollWheelZoom();                            //启用滚轮放大缩小


    var marker = new BMap.Marker(point);  // 创建标注
    map.addOverlay(marker);              // 将标注添加到地图中
    marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画


    map.addEventListener("touchend", function(e) {
//                    alert(e.point.lng + ", " + e.point.lat);
        map.clearOverlays();  //清除标注  或者可以把market 放入数组
        var point = new BMap.Point(e.point.lng, e.point.lat);
        var marker = new BMap.Marker(point);
        map.addOverlay(marker);
        marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画

        document.getElementById("lng").value = e.point.lng;
        document.getElementById("lat").value = e.point.lat;
        document.getElementById("zoom").value = map.getZoom(10);
    });



</script>
<br/><br/><br/><br/><br/>
{include file=footer.html}
